/****************************************************
 * 
 * home soft 版权所有.
 * 
 *****************************************************/

package com.homesoft.runtime.metadata.modle;

/**
 * @author lihg
 * @data 2012-9-15
 */
public class MetadataList<TValue extends IMetadataObject> extends NotifierList<String, TValue> implements IMetadataList {

	private static final long serialVersionUID = 1L;

	public MetadataList(IOwnerAware owner, String memberName) {
		super(owner, memberName);
	}

	@Override
	public boolean ContainsKey(String key) {
		return super.ContainsKey(key);
	}

	@Override
	public TValue get(String key) {
		return super.get(key);
	}

	@Override
	public String GetKeyForItem(TValue item) {
		return ((IMetadataObject)item).getName();
	}
	@Override
	public boolean ChangeItemKey(IMetadataObject item, String newKey){
		if(!this.contains(item)){
			return false;
		}
		return super.ChangeItemKey((TValue)item, newKey);
	}
}
